<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <script src="../../js/jquery.min.js"></script>
</head>
<body>
 <h1>主页</h1>
 <h1><a id="click">登录</a></h1>


 <script>

    var click = $("#click");
    click.click(function() {
        console.log("sss");
        $.ajax({
        type: "post",
        dataType: "json",
        url: 'http://127.0.0.1:8089/test/index',
        // data: dataurl,
        success: function (data) {
                console.log(data);
            },
        error:function(data){
                console.log(data);
                alert(data); //错误的处理
            }
        });

    })
    




 </script>
</body>
</html>